package com.yida.wy.common.domain.request;

import com.yida.wy.common.valid.Update;
import com.yida.wy.common.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 基础数据（业主信息）新增或修改DTO
 *
 * @author lqq
 */
@Data
@ApiModel(value = "基础数据（业主信息）新增或修改DTO")
public class WyBaseOwnerAddUpdateRequest extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "业主名称")
    @NotBlank(message = "业主名称不能为空")
    private String ownerName;

    @ApiModelProperty(value = "手机号码")
    @NotBlank(message = "手机号码不能为空")
    private String ownerPhone;

    @ApiModelProperty(value = "证件号码")
    private String cardNum;

    @ApiModelProperty(value = "业主ID")
    @NotNull(groups = Update.class, message = "请求参数有误[ownerId]为空")
    private Long ownerId;

    @ApiModelProperty(value = "地区ID")
    @NotNull(message = "请求参数有误[areaId]为空")
    private Long areaId;

    @ApiModelProperty(value = "街道ID")
    @NotNull(message = "请求参数有误[streetId]为空")
    private Long streetId;
}
